package com.example.springboothello.listener;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

//@Component
public class OrderListener implements ApplicationListener<OrderEvent> {
    @Override
    public void onApplicationEvent(OrderEvent event) {
        System.out.printf("监听到定义事件：%s", event.getOrder().toString()) ;
    }
}
